<%@ include file="taglib.jsp"%>

 
<html>
    <head>
        <title>Upload Example</title>
    </head>
    <body>
        <a href="/productshop">
        	<img src='<c:url value = "/image/base/back.png"/>' width="50" alt="back" title="back"/>
        </a>
        <form:form modelAttribute="uploadItem" method="post" enctype="multipart/form-data" >
            <fieldset>
                <legend>Upload Fields</legend>
                <p>
                    <form:label for="name" path="name">Name</form:label><br/>
                    <form:input path="name"/>
                </p>
                <form:label for="description" path="description">Description</form:label>
                <p>
                	<form:textarea path="description" rows="10" cols="40"/>
                </p>
                
                <p>
					<form:select path="type">
					<form:option value="0" label="Select type"/>
					<form:options items="${types}" itemValue="id" itemLabel="name"/>
					</form:select>                
                </p>
                <c:if test="${validateZipMessage}">
	                <p>
	                	<span style="color:red">select zip file please</span>
	                </p>
                </c:if>
                <p>
                    <form:label for="fileData" path="fileData">Select Main File: must be ZIP</form:label><br/>
                    <form:input path="fileData" type="file"/>
                </p>

                <p>
                    <form:label for="validateFile" path="validateFile">Need to validate</form:label>
                    <form:checkbox path="validateFile"/>
                </p>
                
                <c:if test="${validatePictureMessage1}">
	                <p>
	                	<span style="color:red">select picture please</span>
	                </p>
                </c:if>
                <p id="pictureTable1">
                    <form:label for="pict" path="pictureFiles[0]">select picture (optional)</form:label><br/>
                    <form:input path="pictureFiles[0]" type="file"/>
                </p>
                <c:if test="${validatePictureMessage2}">
	                <p>
	                	<span style="color:red">select picture please</span>
	                </p>
                </c:if>
                <p id="pictureTable2">
                    <form:label for="pict" path="pictureFiles[1]">select picture (optional)</form:label><br/>
                    <form:input path="pictureFiles[1]" type="file"/>
                </p>
                <p>
                    <input type="submit" />
                </p>
 
            </fieldset>
        </form:form>

        
    </body>
    <script type="text/javascript">
    
    
    </script>
</html>
